<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>创建爬虫源</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
    <link rel="stylesheet" href="{{ url_for('static', filename='styles.css') }}">
</head>
<body>
   {% include 'navbar.html' %}
    <div class="container mt-5">
        <h1>创建爬虫源</h1>
        <form action="{{ url_for('create_source') }}" method="POST">
            <div class="form-group">
                <label for="source_name">源站名称</label>
                <input type="text" class="form-control" id="source_name" name="source_name" required>
            </div>
            <div class="form-group">
                <label for="crawl_rule">爬取规则（JSON）</label>
                <textarea class="form-control" id="crawl_rule" name="crawl_rule" rows="4" required></textarea>
            </div>
            <div class="form-group">
                <label for="source_status">源站状态</label>
                <select class="form-control" id="source_status" name="source_status" required>
                    <option value="0">关闭</option>
                    <option value="1">开启</option>
                </select>
            </div>
            <button type="submit" class="btn btn-primary">保存爬虫源</button>
        </form>
    </div>

    <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.10.2/dist/umd/popper.min.js"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</body>
</html>
